import { createRouter, createWebHashHistory, createWebHistory, RouteRecordRaw } from "vue-router";
import HelloWorldVue from "../components/HelloWorld.vue";
const routes: Array<RouteRecordRaw> = [
  // { path: "/", component: HelloWorldVue },
  // { path: "/",  redirect: "/categoryTable", },
  { path: "/", component: () => import("@/views/Index/index.vue") },
  { path: "/getPlayerInfo", component: () => import("@/views/GetPlayerInfo/index.vue") },
  { path: "/test", component: () => import("@/views/TestPage/index.vue") },
  // { path: "/categoryTable", component: () => import("@/views/CategoryTable/index.vue") },
  { path: "/mapGenerator", component: () => import("@/views/MapGenerator/index.vue") },
  { path: "/login", component: () => import("@/views/Login/index.vue") },
  // { path: "/hex", component: () => import("@/views/Hex/index.vue") },
  // { path: "/threeStudy", component: () => import("@/views/ThreeStudy/index.vue") },
  { path: "/map", component: () => import("@/views/PageMap/index.vue") },
  { path: "/game", component: () => import("@/views/GameH5/index.vue") },
  // { path: "/test", component: test },
];

// 3. 创建路由实例并传递 `routes` 配置
// 你可以在这里输入更多的配置，但我们在这里
// 暂时保持简单
const router = createRouter({
  // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
  history: createWebHistory(),
  routes, // `routes: routes` 的缩写
});

// 5. 创建并挂载根实例
export default router;
